#include "RegularLMON.h"

void RegularLMON::create()
{
	pDevice1 = new ADConverter(0);
	pDevice2 = new ADConverter(1);

	pSignal1 = new Signal("Signal1", pDevice1, 40);
	pSignal2 = new Signal("Signal2", pDevice2, 4);

	pDisplay1 = new ContinousDisplay(pSignal1, QColor(255,0,0), 90, false);
	pDisplay2 = new ContinousDisplay(pSignal2, QColor(255,0,255), 90, false);
	pDisplay3 = new DiscreteDisplay(pSignal1, QColor(255,0,0), false);
	pDisplay4 = new DiscreteDisplay(pSignal2, QColor(255,0,255), false);
}

void RegularLMON::openDevices()
{
	pDevice1->open();
	pDevice2->open();
}

void RegularLMON::setupDisplays()
{
	dc.addDisplayLeft(pDisplay1);
	dc.addDisplayLeft(pDisplay2);
	dc.addDisplayRight(pDisplay3);
	dc.addDisplayRight(pDisplay4);
}

void RegularLMON::startSignalAcquisition()
{
	pSignal1->start();
	pSignal2->start();
}
